# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=baloo5
pkgver=5.113.0
pkgrel=0
pkgdesc="A framework for searching and managing metadata"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later AND ( LGPL-2.1-only OR LGPL-3.0-only )"
depends_dev="
	kbookmarks5-dev
	kcompletion5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kfilemetadata5-dev
	ki18n5-dev
	kidletime5-dev
	kio5-dev
	kjobwidgets5-dev
	kservice5-dev
	lmdb-dev
	qt5-qtdeclarative-dev
	solid5-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/frameworks/baloo.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/baloo-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang"
options="!check" # Tons of broken tests
builddir="$srcdir/baloo-$pkgver"

replaces="baloo<=5.110.0-r0"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	# We don't ship systemd
	rm -r "$pkgdir"/usr/lib/systemd
}

sha512sums="
b123af0e1df704c915e874eac3a63e65a1e8b85382d8890c5c66c05bf088b732e9234278bcb0bc8c7e47a26d638012d9697484da53f8414479b71ec2afbd4060  baloo-5.113.0.tar.xz
"
